package ai.people.netmon.warning.service;

import ai.people.netmon.framework.domain.warning.entity.WarningAccount;
import ai.people.netmon.framework.domain.warning.request.account.AccountJoinedListRequest;
import ai.people.netmon.framework.domain.warning.request.account.WarningAccountRequest;
import ai.people.netmon.framework.domain.warning.vo.AccountAlertDataVO;
import ai.people.netmon.framework.domain.warning.vo.AccountNavigationVO;
import ai.people.netmon.framework.domain.warning.vo.JoinAnalysisAccountVO;
import ai.people.netmon.framework.domain.warning.vo.WarningAccountVO;
import ai.people.netmon.framework.model.response.PageResponse;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
* @author ligua
* @description 针对表【warning_account(预警账号表)】的数据库操作Service
* @createDate 2022-07-28 17:50:38
*/
public interface WarningAccountService extends IService<WarningAccount> {


    /**
     * 重点账号导航页
     *
     * @param userId 用户id
     * @return {@link List}<{@link AccountNavigationVO}>
     */
    List<AccountNavigationVO> keyAccountNavigation(Long userId);

    /**
     * 添加警告帐户
     *
     * @param warningAccount 警告帐户
     */
    void addWarningAccount(WarningAccount warningAccount) throws InterruptedException;

    /**
     * 加入列表分析账户
     *
     * @param accountJoinedListRequest 用户id
     * @return {@link PageResponse}<{@link JoinAnalysisAccountVO}>
     */
    PageResponse<JoinAnalysisAccountVO> listJoinAnalysisAccount(AccountJoinedListRequest accountJoinedListRequest);

    /**
     * 账户列表警报
     *
     * @param warningAccountRequest 警告帐户请求
     * @return {@link PageResponse}<{@link AccountAlertDataVO}>
     */
    PageResponse<AccountAlertDataVO> listAccountAlert(WarningAccountRequest warningAccountRequest);


    /**
     * 更新账号信息
     *
     * @param warningAccount 警告帐户
     */
    void updateAccountInfo(WarningAccount warningAccount);


    /**
     * 获取账户基础信息
     *
     * @param id id
     * @return {@link WarningAccountVO}
     */
    WarningAccountVO getAccountBaseInfo(Long id);


    /**
     * 删除账户
     *
     * @param id id
     */
    void deleteAccount(Long id);

    /**
     * 添加分析
     *
     * @param accountId 帐户id
     * @param platform  平台
     * @return {@link Long}
     */
    Long addAnalysis(String accountId, String platform);
}
